package com.twu.biblioteca;

import java.util.Iterator;
import java.util.List;

public class BibliotecaView {
    public static final String WELCOME_MESSAGE = "Welcome to Biblioteca";
    private ConsolePrinter consolePrinter;

    public BibliotecaView(ConsolePrinter consolePrinter)
    {
        this.consolePrinter = consolePrinter;
    }

    public void DisplayWelcomeMessage() {
        consolePrinter.WriteLine(WELCOME_MESSAGE);
    }

    public void DisplayBookList(List<Book> bookList)
    {
        for(Iterator<Book> i = bookList.iterator(); i.hasNext();)
        {
            Book book = i.next();
            book.PrintBookInformation(consolePrinter);
        }
    }
}
